package com.sun.base;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class IntegerEqu {

    /**
     * false
     * true
     * true
     * true
     * false
     * true
     * false
     * true
     *
     * @param args
     */
//    public static void main(String[] args) {
//        Integer a = 128;
//        Integer b = 128;
//        System.out.println(a == b);
//        System.out.println(a.equals(b));
//
//        Integer f = 127;
//        Integer g = 127;
//        System.out.println(f == g);
//        System.out.println(f.equals(g));
//
//        Integer c = new Integer(129);
//        Integer d = new Integer(129);
//        Integer e = 129;
//        System.out.println(c == d);
//        System.out.println(c.equals(d));
//        System.out.println(c == e);
//        System.out.println(c.equals(e));
//    }

    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2);
        List<Integer> list1 = Arrays.asList(3, 9);
        System.out.println(Collections.disjoint(list, list1));
//        System.out.println(list.retainAll(list1));
        System.out.println(list.stream().anyMatch(list1::contains));
    }
}
